/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// ServiceSubscriptions object for NHibernate mapped table 'ServiceSubscriptions'.
	/// </summary>
	[Serializable]
	public class ServiceSubscriptions : IIdentifier
	{
		#region Member Variables
		protected long _id;
		protected UserInfo _userid;
		protected Services _services;
		protected DateTime _datesubscribed;
		protected DateTime _datelastrenewed;
		protected bool _enabled;
		protected ServiceRates _servicerates;
		#endregion
		#region Constructors
			
		public ServiceSubscriptions() {}

        public ServiceSubscriptions(UserInfo userinfo, Services services, DateTime datesubscribed, DateTime datelastrenewed, bool enabled, ServiceRates servicerates) 
		{
			this._userid= userinfo;
			this._services= services;
			this._datesubscribed= datesubscribed;
			this._datelastrenewed= datelastrenewed;
			this._enabled= enabled;
			this._servicerates= servicerates;
		}

        public ServiceSubscriptions(UserInfo userinfo, Services services, DateTime datesubscribed, DateTime datelastrenewed, ServiceRates servicerates)
		{
			this._userid= userinfo;
			this._services= services;
			this._datesubscribed= datesubscribed;
			this._datelastrenewed= datelastrenewed;
			this._servicerates= servicerates;
		}
		
		#endregion
		#region Public Properties
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}
        public virtual UserInfo UserId
		{
			get { return _userid; }
			set {_userid= value; }
		}
		public  virtual Services Services
		{
			get { return _services; }
			set {_services= value; }
		}
		public  virtual DateTime DateSubscribed
		{
			get { return _datesubscribed; }
			set {_datesubscribed= value; }
		}
		public  virtual DateTime DateLastRenewed
		{
			get { return _datelastrenewed; }
			set {_datelastrenewed= value; }
		}
		public  virtual bool Enabled
		{
			get { return _enabled; }
			set {_enabled= value; }
		}
		public  virtual ServiceRates ServiceRates
		{
			get { return _servicerates; }
			set {_servicerates= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			ServiceSubscriptions castObj = (ServiceSubscriptions)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
